package ipad.asia.service.impl;

import ipad.asia.dao.ConsumerDao;
import ipad.asia.entity.Consumer;
import ipad.asia.service.ConsumerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ConsumerServiceImpl implements ConsumerService {
    @Autowired
    private ConsumerDao consumerDao;
    @Override
    public Consumer findByUserAndPassword(String user, String password) {
        return consumerDao.findByUserAndPassword(user, password);
    }

    @Override
    public Consumer findById(int id) {
        return consumerDao.findById(id);
    }

    @Override
    public Consumer findByUser(String user) {
        return consumerDao.findByUser(user);
    }

    @Override
    public void save(Consumer consumer) {
        consumerDao.save(consumer);
    }
}
